﻿<UserControl x:Class="QUT.Bio.Util.ObjectListSelectionControl"
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

	<UserControl.Resources>
		<DataTemplate x:Key="listBoxTemplate">
			<TextBlock Text="{Binding SelectableText}" />
		</DataTemplate>
	</UserControl.Resources>
	
	<Grid x:Name="LayoutRoot">
		<Grid.RowDefinitions>
			<RowDefinition Height="auto" />
			<RowDefinition Height="*" />
			<RowDefinition Height="auto" />
		</Grid.RowDefinitions>

		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="*" />
			<ColumnDefinition Width="*" />
		</Grid.ColumnDefinitions>

		<TextBlock Name="availableText"
				   Text="Available"
				   Grid.Row="0"
				   Grid.Column="0"
				   Margin="0 8 0 0" />

		<TextBlock Name="selectedText"
				   Text="Selected"
				   Grid.Row="0"
				   Grid.Column="1"
				   Margin="0 8 0 0" />

		<ListBox Name="availableList"
                 ItemTemplate="{StaticResource listBoxTemplate}"
				 Grid.Row="1"
				 Grid.Column="0"
				 SelectionChanged="ItemSelected"
				 Margin="0 5 0 0" 
		>
		</ListBox>
		
		<ListBox Name="selectedList"
                 ItemTemplate="{StaticResource listBoxTemplate}"
				 Grid.Row="1"
				 Grid.Column="1"
				 Margin="0 5 0 0"
				 SelectionChanged="ItemSelected" />
	</Grid>
</UserControl>
